part A:

  In this nested loop, consider the values of i
  and the work done inside each iteration of i:

  when i == N:     work done == N^2
  when i == N/2:   work done == (N/2)^2
  when i == N/4:   work done == (N/4)^2
  ...
  when i == 2:     work done == 2^2 == 4
  when i == 1:     work done == 1^2 == 1

  total work is the sum of the "work done" column ==

  O(N^2)


part B:

  The recurrence relation is 

  T(N) = 2T(N/2) + cN^2
       = 2(2T(N/4) + cN^2/4) + cN^2
       = 2(2(2T(N/8) + cN^2/16) + cN^2/4) + cN^2

       ...

       = ... + cN^2/8 + cN^2/4 + cN^2/2 + cN^2
       = O(N^2)


So, both are big-O of N squared in this case!

